package com.example.demo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Timer;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @Description
 * @Author
 * @Date 2019/10/1 14:33
 **/
public class DateComare {
    public static void main(String[] args) {
        int num =1;
        List<String> skuAll = new ArrayList<>();
        skuAll.add("aa");
        skuAll.add("bb");
        List<String> skus = skuAll.subList(0, skuAll.size()<num?skuAll.size():num);
        skus.contains("");
        skus.clear();
        skuAll.size();
        String integer="";
        add(integer);
        System.out.println(integer);
        ScheduledExecutorService executorService = new ScheduledThreadPoolExecutor(1,
                new ThreadPoolFactory("example-schedule-pool-%d"));
        executorService.scheduleAtFixedRate(new Runnable() {
            @Override
            public void run() {
                //do something
            }
        },1,0, TimeUnit.HOURS);
        Date date = new Date();
        Date date1 = new Date();
    }

    private static void add(String i){
        i="hello";
        System.out.println(i);
    }
}
